package com.buddy.syn.block._04;

public class Task {

    public void doLongTimeTaks(){
        for (int i=0;i<100;i++){
            System.out.println("no synchronized threadName = "
                    +Thread.currentThread().getName()+" i= "+(i+1));
        }
        System.out.println("");

        synchronized (this){
            for (int i=0;i<100;i++){
                System.out.println("synchronized threadName = "
                        +Thread.currentThread().getName()+" i= "+(i+1));
            }
        }
    }
}
